SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE procedure dbo.[DnnProduct_DeleteModulePermissionsByUserID]
	@PortalID int,
	@UserID int
AS
	DELETE FROM dbo.DnnProduct_ModulePermission
		FROM dbo.DnnProduct_ModulePermission MP
			INNER JOIN dbo.DnnProduct_Modules AS M ON MP.ModuleID = M.ModuleID
		WHERE M.PortalID = @PortalID
		AND MP.UserID = @UserID
GO
